/****************
 *@description:  拼团活动接口
 *@author: Xhd
 *@date: 2023-09-07 11:17:28
 *@version: V1.0.0
*************************************************************************/

import React from 'react'

//活动列表
export async function apiGetSpellTogetherPage(params) {
  return await React.$postJson('/market/api/teamActivity/page', params, {
    headers: {
      'Content-Type': 'application/json',
    }
  });
}

//新建活动
export async function apiPostSpellTogetherAdd(params) {
  return await React.$postJson('/market/api/teamActivity/add', params, {
    headers: {
      'Content-Type': 'application/json',
    }
  });
}

//修改活动
export async function apiPostSpellTogetherEdit(params) {
  return await React.$postJson('/market/api/teamActivity/edit', params, {
    headers: {
      'Content-Type': 'application/json',
    }
  });
}

// 编辑活动 删除商品校验
export async function apiPostSpellTogetherEditDelGoods(params) {
  return await React.$get('/market/api/teamActivity/delGoods', params);
}

//查看活动
export async function apiGetSpellTogetherView(params) {
  return await React.$get('/market/api/teamActivity/detail', params);
}

//提前结束
export async function apiGetSpellTogetherEnd(params) {
  return await React.$get('/market/api/teamActivity/end',params)
}

//数据看板
export async function apiGetSpellTogetherDashboards(params) {
  return await React.$postJson('/manage/api/b/teamStatistics/page', params, {
    headers: {
      'Content-Type': 'application/json',
    }
  });
}

//数据看板-导出
export async function apiExportDataDashboards(params) {
  return await React.$postJson('/manage/api/b/teamStatistics/page', params, {
    headers: {
      'Content-Type': 'application/json',
    }
  });
}
